﻿namespace Netbits.Common.Logging
{
	/// <summary>
	/// Represents a new log-item entry
	/// </summary>
	public class LogEntry
	{
		#region Private variables

		/// <summary>
		/// Get or set the ticks for this log-entry
		/// </summary>
		public long Ticks;
		/// <summary>
		/// Get or set the message for this log-entry
		/// </summary>
		public string Message;
		/// <summary>
		/// Get or set the type for this log-entry
		/// </summary>
		public LogType Type;
		/// <summary>
		/// The LogGroup
		/// </summary>
		readonly LogGroup _Group;

		#endregion

		#region Constructor

		/// <summary>
		/// Create new instance of LogEntry.
		/// </summary>
		/// <param name="Group_">The LogGroup that this items was in</param>
		/// <param name="Ticks_">The number of ticks for this message / timestamp</param>
		/// <param name="Type_">The type of this message</param>
		/// <param name="Message_">The message</param>
		public LogEntry( LogGroup Group_, long Ticks_, LogType Type_, string Message_ )
		{
			_Group = Group_;

			Ticks = Ticks_;
			Type = Type_;
			Message = Message_;
		}

		#endregion

		#region Public Properties

		/// <summary>
		/// Get the LogGroup that this item are in.
		/// </summary>
		public LogGroup Group
		{
			get
			{
				return _Group;
			}
		}

		#endregion
	}
}
